package com.example.easycharge.controller;

import com.example.easycharge.entity.Bill;
import com.example.easycharge.service.BillService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;

@Tag(name = "账单查看接口组")
@RestController
@RequestMapping("bill")
public class BillController {

    @Autowired
    private BillService billService;

    @Operation(summary = "获取当前正在运行的所有账单信息")
    @GetMapping("/admin")
    public Collection<Bill> getAllBill() {
        return billService.getAllBill();
    }
}
